<template>
	<view class="post page bgff py14 px20 ">
		 <u-swiper :list="list" @change="e => currentNum = e.current"  keyName="image" previousMargin="30" nextMargin="30" height="85vh"
			circular :autoplay="false" radius="5" bgColor="#ffffff" class="pt20">
			<view slot="indicator" class="indicator-num">
				<text class="indicator-num__text">{{ currentNum + 1 }}/{{ list.length }}</text>
			</view>	   
		</u-swiper>
		   
		<view class="flex flexC flexJC my20">
			<button @click="goDetail" hover-class="none" class="bg41 fs14 py12 w-8 cff r40">分享海报</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				currentNum: 0,
				list: []
			};
		},
		onLoad() {
			this.getList();
		},
		methods:{
			
			goDetail(){
				var url = this.list[this.currentNum].image;
				
				uni.navigateTo({
					url:'../member/posterDetail?bg='+encodeURIComponent(url)
				})
			},
			
			getList(){
				
				let that = this;
				let param = {
				};
				this.$api.sharePosterList(param).then(res => {
					
					if(res.code == 1){
						that.list = res.data;
					}else{
						
					}
					
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
.post {
	.indicator-num {
	        padding: 2px 0;
	        background-color: rgba(0, 0, 0, 0.35);
	        border-radius: 100px;
	        width: 35px;
	        @include flex;
	        justify-content: center;
	
	        &__text {
	             color: #FFFFFF;
	             font-size: 12px;
	         }
	    }
	.bgfe {background-color: #FEB300;}
}
</style>
